﻿@{
    Layout = null;
}
@if (ViewBag.Project.ViewEngine == ViewEngine.WebForms || ViewBag.Project.ViewEngine == ViewEngine.Mvc)
{
@:<%@@ Master Language="@(ViewBag.Project.Language == CodeLanguage.Cs ? "C#" : "VB")" Inherits="@SampleHelper.VaryByViewEngine("System.Web.UI.MasterPage", "System.Web.Mvc.ViewMasterPage", null)" %>
@:<%@@ Import Namespace="Krystalware.SlickUpload" %>
}
@if (ViewBag.Project.ViewEngine == ViewEngine.WebForms || ViewBag.Project.ViewEngine == ViewEngine.Mvc)
{
<script runat="server">
    @if (ViewBag.Project.Language == CodeLanguage.Cs)
    {
    <text>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.Title.IndexOf(" - SlickUpload Samples") == -1)
            Page.Title += " - SlickUpload Samples";
    }
    </text>
    }
    else
    {
    <text>
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        If Page.Title.IndexOf(" - SlickUpload Samples") = -1 Then
            Page.Title += " - SlickUpload Samples"
        End If
    End Sub
    </text>
    }
</script>
}
else
{
    if (ViewBag.Project.Language == CodeLanguage.Cs)
    {
<text>@@using Krystalware.SlickUpload
@@{
    if (ViewBag.Title.IndexOf(" - SlickUpload Samples") == -1)
    {
        ViewBag.Title += " - SlickUpload Samples";
    }
}
</text>
    }
    else
    {
<text>@@Imports Krystalware.SlickUpload
@@Code
    If ViewBag.Title.IndexOf(" - SlickUpload Samples") <> -1 Then
        ViewBag.Title += " - SlickUpload Samples";
    End If
@@End Code
</text>     
    }
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head @Html.Raw((ViewBag.Project.ViewEngine == ViewEngine.WebForms || ViewBag.Project.ViewEngine == ViewEngine.Mvc) ? "runat=\"server\"" : null)>
    <title>SlickUpload Samples</title>
    <link rel="stylesheet" type="text/css" href="@SampleHelper.ResolveContent("~/content/site.css")" />
    <link rel="stylesheet" type="text/css" href="@SampleHelper.ResolveContent("~/content/slickupload.css")" />
<!--[if lte IE 6]>
    <style type="text/css">
        a, span, b, img { behavior: url(@SampleHelper.ResolveContent("~/Content/iepngfix/iepngfix.htc")) }
    </style>
    <script type="text/javascript" src="@SampleHelper.ResolveContent("~/Content/iepngfix/iepngfix_tilebg.js")"></script>
    <script type="text/javascript">
        var _kwInit = _kwInit || [];

        _kwInit.push(function() { window.setTimeout(IEPNGFix.update, 1); });
    </script>
<![endif]-->
    @SampleHelper.DefineSection("head")
</head>
<body>
    <div id="headerContainer">
        <div id="header">
            <a href="http://krystalware.com/slickupload"><img width="125" height="29" src="@SampleHelper.ResolveContent("~/Content/krystalware_small.png")" style="float:right" /></a>
            <div style="clear:none">
                <img width="48" height="48" src="@SampleHelper.ResolveContent("~/Content/SlickUpload_48x48.png")" style="vertical-align:middle;margin-right:.5em" />
                SlickUpload Samples
            </div>
        </div>
    </div>
    <div id="contentContainer">
        <div id="sidebar">
            <h2 style="margin:0;padding:0">Samples</h2>
            @foreach (Sample s in ViewBag.Samples)
            {
            <p>@SampleHelper.ActionLink(s.Name, s.Path) &ndash; @s.Description</p>
            }
            @*<p>@SampleHelper.ActionLink("Client API", "ClientApi") &ndash; uses the SlickUpload client API to create an upload form without using the SlickUpload server side controls or helpers.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/FileNameGenerator/Default") + CurrentLanguageExtension %>">FileNameGenerator</a></strong> &ndash; how to control and generate server filenames for files as they are uploaded.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/AdditionalFields/Default") + CurrentLanguageExtension %>">Additional Fields</a></strong> &ndash; how to add additional input fields for each selected file.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/CustomProgress/Default") + CurrentLanguageExtension %>">Custom Progress</a></strong> &ndash; display custom progress information during a postprocessing step after files are uploaded.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/Localization/Default") + CurrentLanguageExtension %>">Localization</a></strong> &ndash; how to localize the SlickUpload control.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/ModalProgress/Default") + CurrentLanguageExtension %>">Modal Progress</a></strong> &ndash; show the progress display in a modal.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/Skinned/Default") + CurrentLanguageExtension %>">Skinned</a></strong> &ndash; skin the file list and progress display.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/S3Upload/Default") + CurrentLanguageExtension %>">Upload to Amazon S3</a></strong> &ndash; how to upload to Amazon's Simple Storage Service with progress display.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/SqlClient/Default") + CurrentLanguageExtension %>">Upload to SQL Server</a></strong> &ndash; upload directly to a SQL Server, streaming with no memory usage.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/CustomUploadStreamProvider/Default") + CurrentLanguageExtension %>">Custom UploadStreamProvider</a></strong> &ndash; how to develop your own upload stream provider &ndash; this example shows how to zip files as they are uploaded.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/Clustered/Default") + CurrentLanguageExtension %>">Clustered</a></strong> &ndash; use a StatusManager configuration to allow uploads with progress to a cluster/web farm/web garden.</p>
            <p><strong><a href="@SampleHelper.ResolveContent("~/simple")>Simple</a></strong> &ndash; the bare metal SlickUpload control with no customizations.</p>*@
            <h2 style="margin-bottom:0;padding-bottom:0">Resources</h2>
            <p><strong><a href="http://krystalware.com/slickupload/documentation">Documentation</a></strong> &ndash; Read the SlickUpload documentation.</p>
            <p style="margin-bottom:0"><strong><a href="http://krystalware.com/slickupload/forum">Forums</a></strong> &ndash; Ask or answer questions in the SlickUpload support forum.</p>
        </div>
        <div id="content">
            <h1 class="title">@SampleHelper.RenderStatement(SampleHelper.VaryByViewEngine("Page.Title.Substring(0, Page.Title.IndexOf(\" -\"))", "Page.Title.Substring(0, Page.Title.IndexOf(\" -\"))", "ViewBag.Title.Substring(0, ViewBag.Title.IndexOf(\" -\"))").ToString()) Sample</h1>
            @SampleHelper.DefineSection("content", true)
            <div style="border:1px solid #ccc;padding:.5em">
                <strong>NOTE:</strong> the maximum allowed request size for this sample is <strong>
                @if (ViewBag.Project.Language == CodeLanguage.Cs)
                {
                @SampleHelper.RenderStatement("SlickUploadContext.Config.UploadProfiles[\"default\"].MaxRequestLength / 1024")
                }
                else
                {
                @SampleHelper.RenderStatement("SlickUploadContext.Config.UploadProfiles(\"default\").MaxRequestLength / 1024")
                }
                MB</strong>. If you attempt to upload files larger than this,
                you will recieve a oversized upload error which SlickUpload will handle gracefully. This is controlled by the maxRequestLength attribute of current uploadProfile
                in the web.config file.
            </div>
            @SampleHelper.DefineSection("configuration")
            <h2>Description</h2>
            @SampleHelper.DefineSection("description")
        </div>
    </div>
    <div id="footer">
        &copy; @SampleHelper.RenderStatement("DateTime.Now.Year") Krystalware
    </div>
</body>
</html>